﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HostsManager.Forms
{
    public partial class InputBox : Form
    {
        public InputBox()
        {
            InitializeComponent();
        }

        public static DialogResult Show(string caption, string title, ref string data)
        {
            using (InputBox form = new InputBox())
            {
                form.StartPosition = FormStartPosition.CenterScreen;

                form.caption.Text = caption;
                form.Text = title;
                form.data.Text = data;
                
                DialogResult result = form.ShowDialog();
                data = form.data.Text;
                return result;
            }
        }
    }
}
